import request from '@/utils/request'

// 查询运行记录列表
export function listControl(query) {
  return request({
    url: '/monitor/control/list',
    method: 'get',
    params: query
  })
}

// 查询运行记录详细
export function getControl(id) {
  return request({
    url: '/monitor/control/' + id,
    method: 'get'
  })
}

// 新增运行记录
export function addControl(data) {
  return request({
    url: '/monitor/control',
    method: 'post',
    data: data
  })
}

// 修改运行记录
export function updateControl(data) {
  return request({
    url: '/monitor/control',
    method: 'put',
    data: data
  })
}

// 删除运行记录
export function delControl(id) {
  return request({
    url: '/monitor/control/' + id,
    method: 'delete'
  })
}

// 查询设备类型下拉树结构
export function drTypeSelect() {
  return request({
    url: '/monitor/control/listAllDrType',
    method: 'get'
  })
}

// 查询缓存键名列表
export function listDevice(drtypeid) {
  return request({
    url: '/monitor/control/listByDrTypeId/' + drtypeid,
    method: 'get'
  })
}

